package day02;

import junit.framework.Assert;
import org.junit.Test;

import java.util.Arrays;

/**
 * @author 你的名称
 * @createTime 31 16:46
 * @description
 */
public class PermissionTest extends BaseTest{
    @Test
    public void testIsPermitted(){
        login("classpath:shiro-permission.ini","chu","1234");
        Assert.assertTrue(subject().isPermitted("user:create"));
        Assert.assertTrue(subject().isPermittedAll("user:update","user:create"));
        Assert.assertFalse(subject().isPermitted("user:delete"));
        subject().checkPermissions("user:update");
    }
}